import ('./cesium-viewshed.js')
//存储可视域分析结果
var arrViewField = []
//分析参数配置对象
var viewModel ={verticalAngle:90, horizontalAngle:120, distance: 10}

function axToolViewshed(layer){
    //创建可视域
    var viewshed = new Cesium.ViewShed3D(viewer,{
        horizontalAngle:Number(viewModel.horizontalAngle),
        verticalAngle:Number(viewModel.verticalAngle),
        distance: Number(viewModel.distance),
        calback: function () {
          viewModel.distance = viewshed.distance;
        }
    });
    arrViewField.push(viewshed);
}

//封装函数remove
function removeViewshed(){
    for(var i=0;i<arrViewField.length;i++){
        arrViewField[i].destroy();
    }
    arrViewField=[];
}
